Skip to content

bpo-36155: Check for identity on test_gc.test_get_objects#12116

Merged
pablogsal merged 1 commit into
python:masterfrom
pablogsal:use_identity_test_gc
Mar 1, 2019
Merged

bpo-36155: Check for identity on test_gc.test_get_objects#12116
pablogsal merged 1 commit into
python:masterfrom
pablogsal:use_identity_test_gc

Conversation

@pablogsal

@pablogsal pablogsal commented Mar 1, 2019

Copy link
Copy Markdown
Member

@pablogsal pablogsal self-assigned this Mar 1, 2019
@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting merge labels Mar 1, 2019
@pablogsal

Copy link
Copy Markdown
Member Author

Tested manually:

./python.exe -m test -m test_gc
....
Total duration: 1 min 55 sec
Tests result: SUCCESS

@tirkarthi

Copy link
Copy Markdown
Member

One more way to test this. Below passes with PR but fails on master as per https://bugs.python.org/issue36155#msg336903

./python.exe -m unittest unittest.test.testmock test.test_gc
.................................................................................................................................................................s..................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 404 tests in 8.209s

OK (skipped=1)

@pablogsal

Copy link
Copy Markdown
Member Author

One more way to test this. Below passes with PR but fails on master as per https://bugs.python.org/issue36155#msg336903

./python.exe -m unittest unittest.test.testmock test.test_gc
.................................................................................................................................................................s..................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 404 tests in 8.209s

OK (skipped=1)

This is the one I was using:

./python.exe -m test  test_asyncio test_gc -m test_gc  -v

until I found the real cause of the problem (the unnitest.mock._ANY). ;)

@pablogsal pablogsal merged commit d60a79a into python:master Mar 1, 2019
@pablogsal pablogsal deleted the use_identity_test_gc branch March 1, 2019 09:12

@tirkarthi tirkarthi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM since it uses is to check object presence that fixes mock.ANY which always returns True for == .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants